﻿namespace Guia.Elements.PatternServants
{
    using System;

    /// <summary>
    /// Represents the interface for the SelectionItem-Pattern simple functionality.
    /// </summary>
    public interface ISelectionItemSimple
    {
        /// <summary>
        /// Gets a value indicating whether this item is selected or not.
        /// </summary>
        bool IsSelected { get; }

        /// <summary>
        /// Selects this item.
        /// If multiple selection is allowed, this selection causes that only this item is selected. Thus, other selected items may become unselected.
        /// </summary>
        /// <exception cref="InvalidOperationException">This exception is thrown when this item can't be selected (e.g. because it is not enabled).</exception>
        void Select();
    }
}